import Vue from 'vue'
import Router from 'vue-router'
import Home from '../pages/Home'

Vue.use(Router)

export default new Router({
  linkActiveClass: "is-active",
  routes: [
    {
      path: '/',
      component: Home,
      redirect:"/index",
      children: [
        {
          path: 'index',
          component: resolve => {
            require(["../pages/Index"], resolve)
          }
        },
        {
          path: 'release',
          component: resolve => {
            require(["../pages/Relsase"], resolve)
          }
        },
        {
          path: 'message',
          component: resolve => {
            require(["../pages/Message"], resolve)
          }
        },
        {
          path: 'collect',
          component: resolve => {
            require(["../pages/Collect"], resolve)
          }
        },
        {
          path: 'user',
          component: resolve => {
            require(["../pages/User"], resolve)
          }
        },
      ]
    },
    {
      path:"/topics/:countentid",
       component:resolve=>{
        require(["../pages/Countent"],resolve)
       }
    }
  ]
})
